Skip to content

feat(trackio): capture experiments + record the hosted URL on the DAG ([70]) - #247

Merged
christophergeyer merged 4 commits into
rc/0.4.1from
cg/trackio-capture
Jul 27, 2026
Merged

feat(trackio): capture experiments + record the hosted URL on the DAG ([70])#247
christophergeyer merged 4 commits into
rc/0.4.1from
cg/trackio-capture

Conversation

@christophergeyer

Copy link
Copy Markdown
Member

What

Standardize on trackio as the experiment sink, with zero repo code change, and record the hosted dashboard URL on the DAG.

1. Shim injectionroar run --capture-trackio [--trackio-space reproducible-ai/experiments]. The injected sitecustomize aliases the workload's wandb → trackio and installs a minimal mlflow → trackio shim (patching trackio.init to sync to the HF Space). An unmodified repo's W&B/MLflow logging funnels into a hosted trackio experiment. Gated by ROAR_CAPTURE_TRACKIO; best-effort (missing trackio = silent no-op). Also settable via env / .roar/config.toml [env].

2. URL captureExperimentTrackerAnalyzer._extract_trackio_info reads trackio's per-project SQLite for run identity only and emits the public Space URL (…/spaces/<space>?project=<project>) onto the DAG. URL-only — never the metrics (TReqs stores no customer data; the metrics live on the hosted dashboard, like a W&B URL).

Grounding

The shim + hosting were proven end-to-end before this PR: the same wandb→trackio + mlflow→trackio shims captured real runs (verified in trackio's SQLite), and trackio.init(space_id=…) produced a live public HF-Space dashboard on our org.

Tests

5 analyzer (incl. a no-metric-leak invariant + fake trackio SQLite fixture) + 5 shim (install/gating/space-injection/no-clobber/missing-trackio) = 10; test_system_labels regression green; ruff + mypy clean.

Sibling of #245 (get --cache) / #246 (put → HF). Should ride 0.4.1.

🤖 Generated with Claude Code

chrisgeyertreqs and others added 2 commits July 27, 2026 14:27
…RL on the DAG ([70])

Two pieces, both zero-metric-storage (TReqs stores no customer data — the DAG
carries a URL to the externally-hosted experiment, like a W&B URL):

1. Shim injection (roar run --capture-trackio [--trackio-space OWNER/NAME]):
   the injected sitecustomize aliases the workload's wandb -> trackio and installs
   a minimal mlflow -> trackio shim, patching trackio.init to sync to the HF Space.
   So an UNMODIFIED repo's W&B/MLflow logging funnels into a hosted trackio
   experiment with no code edit. Gated by ROAR_CAPTURE_TRACKIO; best-effort (a
   missing trackio is a silent no-op). Extracted to trackio_shim.py for testing.
   (Empirically grounded end-to-end: the same shim captured real wandb+mlflow runs,
   and trackio.init(space_id=...) yields a live public HF-Space dashboard.)

2. ExperimentTrackerAnalyzer: new _extract_trackio_info reads trackio's per-project
   SQLite for run identity only and emits the hosted Space URL
   (https://huggingface.co/spaces/<space>?project=<project>) onto the DAG. URL-only
   — never the metrics. space_id from ROAR_TRACKIO_SPACE_ID or the synced run.

Tests: 5 analyzer (incl. a no-metric-leak invariant) + 5 shim = 10; system_labels
regression green; ruff + mypy clean. Should ride the 0.4.1 release.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…crape-only, no flags

Corrected per Chris: roar does NOTHING trackio-specific at run time (no shim, no
--capture-trackio/--trackio-space flags, no env). It just SCRAPES the hosted-
experiment link trackio leaves behind — exactly like it scrapes the W&B URL.

_extract_trackio_info reads the run identity + the Space from trackio's own
project_metadata (key='space_id', where trackio persists it after a run syncs) and
emits https://huggingface.co/spaces/<space>?project=<project>. URL-only — never the
metrics (TReqs stores no customer data). Grounded against a real synced run.

The wandb->trackio aliasing (making an unmodified wandb repo emit trackio) is a
separate, campaign-side concern for reproducibleailist.org — NOT roar, NOT a CLI
arg — so the shim + flags added earlier are removed here.

Tests: 4 analyzer (project_metadata scrape + no-space + end-to-end + no-metric-leak);
ruff + mypy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@christophergeyer
christophergeyer marked this pull request as ready for review July 27, 2026 16:26
chrisgeyertreqs and others added 2 commits July 27, 2026 17:59
Fixes two QA-found bugs in the trackio experiment scraper:

- F1 (cross-DB contamination): the extractor reused a single shared dict
  across all *.db files, so a run touching >1 trackio project could splice
  one project's Space onto another's name (.../alpha-space?project=zebra).
  Now emits one record per project DB and builds each URL per-DB.
- F2 (schema brittleness): the run-identity and space-id lookups shared one
  try-block and hardcoded SELECT run_id, run_name, so an older/imported
  trackio schema (no run_id column, or no project_metadata table) discarded
  BOTH the identity and the URL. The two lookups are now independent and
  the run-identity query adapts to a run_id-less metrics table.

Metric-leak invariant preserved (only run_id/run_name read, never metrics).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@christophergeyer
christophergeyer merged commit cd29afb into rc/0.4.1 Jul 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants